home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / LINUX / RAID1.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  957b  |  50 lines

  1. #ifndef _RAID1_H
  2. #define _RAID1_H
  3.  
  4. #include <linux/md.h>
  5.  
  6. struct mirror_info {
  7.     int        number;
  8.     int        raid_disk;
  9.     kdev_t        dev;
  10.     int        next;
  11.     int        sect_limit;
  12.  
  13.     /*
  14.      * State bits:
  15.      */
  16.     int        operational;
  17.     int        write_only;
  18.     int        spare;
  19. };
  20.  
  21. struct raid1_data {
  22.     struct md_dev *mddev;
  23.     struct mirror_info mirrors[MD_SB_DISKS];      /* RAID1 devices, 2 to MD_SB_DISKS */
  24.     int raid_disks;
  25.     int working_disks;            /* Number of working disks */
  26.     int last_used;
  27.     unsigned long    next_sect;
  28.     int        sect_count;
  29.     int resync_running;
  30. };
  31.  
  32. /*
  33.  * this is our 'private' 'collective' RAID1 buffer head.
  34.  * it contains information about what kind of IO operations were started
  35.  * for this RAID5 operation, and about their status:
  36.  */
  37.  
  38. struct raid1_bh {
  39.     unsigned int        remaining;
  40.     int            cmd;
  41.     unsigned long        state;
  42.     struct md_dev        *mddev;
  43.     struct buffer_head    *master_bh;
  44.     struct buffer_head    *mirror_bh [MD_SB_DISKS];
  45.     struct buffer_head    bh_req;
  46.     struct buffer_head    *next_retry;
  47. };
  48.  
  49. #endif
  50.